<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link
	href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700"
	rel="stylesheet" type="text/css" />
<link href="default.css" rel="stylesheet" type="text/css" media="all" />
<link href="themes/2/js-image-slider.css" rel="stylesheet"
	type="text/css" />
<jsp:useBean id="beans" class="beans.LoginBean" scope="page" />
<script src="themes/2/js-image-slider.js" type="text/javascript"></script>
<!--[if IE 6]>
<link href="default_ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->
</head>
<body>
	<div id="wrapper">
		<div id="header">
			<div id="logo">
				<a href="index.jsp"> <img src="images/tea_logo.jpg"
					alt="Totalitea Logo" align="left" width="150px" height="150px" />
				</a> <br /> <br /> <img src="images/transparent_text_effect.png"
					alt="Totalitea Title" align="left" width="420px" height="150px"/>

			</div>
		</div>
		<!-- end #header -->
		<div id="menu">
			<ul>
				<li><a href="index.jsp">Home</a></li>
				<li class="current_page_item"><a href="#">Login</a></li>
				<li><a href="Search_Results.jsp">Search</a></li>
				<li><a href="Basket.jsp">Basket</a></li>
				<li class="last"><a href="#">Contact Us</a></li>
			</ul>
		</div>
		<div id="container">
			<div id="underthemenu">
				<div id="search">
					<form action="SearchServlet" METHOD="GET" name="page1form">
						<input type="hidden" name="page" value="1"> <input
							type="text" name="searchTerm"> <select
								name="searchOption">
									<option value="0">Description</option>
									<option value="1">Category</option>
							</select> <input type="image" value="submit" src="images/search.png"
								alt="Search" />
					</form>
				</div>
				<div id="Login_Page">
					<div id="login">
						<fieldset>
							<br />
							<legend>Login</legend>
							<form action="LoginServlet" METHOD="GET" name="loginForm">
								<input type="hidden" name="page" value="1" />
								<p>
									Username : <input type="text" name="userName" /> <br />
									Password &nbsp;: <input type="password" name="passWord" />
								</p>
								<span style="float: right; margin-right: 7%;">
								 <input
									type="submit" value="Login" />
								</span>
								<%
									String username = (String) request.getSession().getAttribute(
											"userName");
									String password = (String) request.getSession().getAttribute(
											"passWord");

									if ((username != null && !username.isEmpty())
											|| (password != null && !password.isEmpty())) {
										if (!beans.isLoginValid(username, password)) {
								%><span>Invalid Login</span>
								<%
									}
										/*username = "";
										password = "";*/
									}
								%>
							</form>
							<br />
							<br />
						</fieldset>
					</div>
					<br /> <br /> <br />
				</div>
			</div>
		</div>
		<br /> <br /> <br /> <br /> <br /> <br />
	</div>
	<div id="footer">
		<p>Copyright&copy; 2013 Totalitea.com. All rights reserved.&trade;</p>
	</div>
</body>
</html>